<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8">
    <title></title>

    <meta name="keywords" content="关键词">
    <meta name="description" content="网站描述">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <link href="__PUBLIC__/gii/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" href="__PUBLIC__/qwadmin/css/ace-part2.css" class="ace-main-stylesheet"/>
    <link rel="stylesheet" href="__PUBLIC__/qwadmin/css/ace-ie.css"/>
    <script src="__PUBLIC__/gii/html5shiv.js"></script>
    <script src="__PUBLIC__/gii/respond.js"></script>
    <![endif]-->
</head>
<body class="no-skin">
<!-- #section:basics/navbar.layout -->


<!-- /section:basics/navbar.layout -->

            <div class="page-content">
                <div class="row">
                    <div class="col-xs-1"></div>
                    <div class="col-xs-10">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="row">
                            <div class="cf">
                                <a class="btn btn-info" href="{:U('more')}"
                                   value="">新增</a>
                            </div>
                            <div class="space-4"></div>
                            <form id="form" method="post" action="{:U('remove')}">
                                <table class="table table-striped table-bordered table-hover">
                                    <thead>
                                    <tr>
                                        <th class="center"><input class="check-all" value="" type="checkbox"></th>
                                        <th>id</th>
<th>pid</th>
<th>name</th>
<th>title</th>
<th>icon</th>
<th>type</th>
<th>status</th>
<th>condition</th>
<th>islink</th>
<th>o</th>
<th>tips</th>

                                        <th class="center">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <foreach name="list" item="vo" >
                                        <tr>
                                            <td class="center">
                                                <input class="ids" name="ids[]" value="{$vo['id']}" type="checkbox">
                                            </td>
                                           <td>{$vo["id"]}</td>
<td>{$vo["pid"]}</td>
<td>{$vo["name"]}</td>
<td>{$vo["title"]}</td>
<td>{$vo["icon"]}</td>
<td>{$vo["type"]}</td>
<td>{$vo["status"]}</td>
<td>{$vo["condition"]}</td>
<td>{$vo["islink"]}</td>
<td>{$vo["o"]}</td>
<td>{$vo["tips"]}</td>

                                            <td class="center ">
                                                <a style="margin: 1px" class="btn btn-info" href="{:U('modify',array('id'=>$vo['id']))}">修改</a>&nbsp;
                                                <a style="margin: 1px" class="del btn btn-danger" href="javascript:;"
                                                   val="{:U('remove',array('ids'=>$vo['id']))}" title="删除">删除</a>
                                            </td>
                                        </tr>
                                    </foreach>

                                    </tbody>
                                </table>
                            </form>
                            <div class="cf">
                                <input id="submit" class="btn btn-danger" value="删除" type="button">
                            </div>
                            <div>
                               {$page}
                            </div>
                        </div>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <div class="footer">
        <div class="footer-inner">
            <!-- #section:basics/footer -->
            <div class="footer-content">
                            <span class="bigger-120">

                            </span>
            </div>

            <!-- /section:basics/footer -->
        </div>
    </div>

    <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse display">
        <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
    </a>

</div><!-- /.main-container -->

<!-- basic scripts -->

<!--[if !IE]> -->
<script type="text/javascript">
    window.jQuery || document.write("<script src='__PUBLIC__/gii/jquery.js'>" + "<" + "/script>");
</script>
<script src="__PUBLIC__/gii/jquery.js"></script>
<script src="__PUBLIC__/gii/bootbox.js"></script>
<script src="__PUBLIC__/gii/bootstrap.js"></script>

<!-- <![endif]-->


<!-- inline scripts related to this page -->
<script type="text/javascript">
    $(function () {
        $(".check-all").click(function () {
            $(".ids").prop("checked", this.checked);
        });
        $(".ids").click(function () {
            var option = $(".ids");
            option.each(function (i) {
                if (!this.checked) {
                    $(".check-all").prop("checked", false);
                    return false;
                } else {
                    $(".check-all").prop("checked", true);
                }
            });
        });
        $("#submit").click(function () {
            bootbox.confirm({
                title: "系统提示",
                message: "确定要删除所选？",
                callback: function (result) {
                    if (result) {
                        $("#form").submit();
                    }
                },
                buttons: {
                    "cancel": {"label": "取消"},
                    "confirm": {
                        "label": "确定",
                        "className": "btn-danger"
                    }
                }
            });
        });
        $(".del").click(function () {
            var url = $(this).attr('val');
            bootbox.confirm({
                title: "系统提示",
                message: "确定要删除?",
                callback: function (result) {
                    if (result) {
                        window.location.href = url;
                    }
                },
                buttons: {
                    "cancel": {"label": "取消"},
                    "confirm": {
                        "label": "确定",
                        "className": "btn-danger"
                    }
                }
            });
        });
    })
</script>

</body>
</html>
